#include <stdio.h>
//交换一个整数的二进制位的奇数位和偶数位
#define Exchange(num) (((num*2)&(-1431655766))+((num/2)&(1431655765)))
//-1431655766 = 10101010101010101010101010101010
//1431655765 = 01010101010101010101010101010101
int main()
{
    printf("%d\n", Exchange(2));
    printf("%d\n", Exchange(5));
    printf("%d\n", Exchange(-1431655766));
    printf("%d\n", Exchange(1431655765));
    return 0;
} 